// 更新用户信息请求体
import request from '@/utils/request.js'

const updateUserInfoAPI = (userForm) => {
  return request({
    method: 'put',
    url: '/my/userinfo',
    data: userForm// 提交获取的表单信息
  })
}

// 上传头像
const updateUserAvatarAPI = (avatarStr) => {
  return request({
    method: 'patch',
    url: '/my/update/avatar',
    data: {
      avatar: avatarStr
    }
  })
}

// 重置密码
const updatePwdAPI = (pwdForm) => {
  return request({
    method: 'patch',
    url: '/my/updatepwd',
    data: pwdForm
  })
}

export {
  updateUserInfoAPI, updateUserAvatarAPI, updatePwdAPI
}
